~4Dgifts/toolbox/src/exampleCode/irix/scripts/rcs README a directory of scripts written to facilitate manipulation of source trees employing RCS Comprcs Compare RCS files with non-RCS files in another directory. Performs an rcsdiff on all files in the local RCS directory with files in the directory specified. If no directory specified, it will check if an environment variable COMPRDIR exists and use the directory there. If neither exists, assumes the local directory. If a file is provided, checks only this file. Synopsis: Comprcs [-d <dir>] [-<opts>] [<file>...] Use: The purpose of this routine is to check if another directory contains sources that are different from the files already checked in. This could be used when copying a new source tree off of the internet to find out if any of the source files have changed. Delrcs Delete all the files that exist in RCS. Synopsis: Delrcs Use: The purpose of this routine is to delete all the files that have a respective RCS file. Usually, this is performed *after* doing a 'check' command and making sure that all files that have been checked out and locked have been checked back in. What is left in the directory are all the files that have never been checked in and have no respective RCS file. This can be real useful when a directory has a lot of source files and it is hard to determine which files are new. DiffRCS This script will perform an rcsdiff on each file found in the current directory (ignoring *~, *.o and *.out files) and just list those files that are different or not checked in (don't have a respective RCS file). Use: Similar use as for Comprcs. Lscoed Provide a list of all files that are checked out of RCS. Use: This is similar to the 'check' command except that it will print a list of all files checked out whether locked or not. Makercsrev Make a revision of every RCS file. If there is an environment variable RCSOPTS, it will use options provided with this variable when checking out the revision. Also, if there is a ./.rcsopts file, it will search for a line beginning with 'co ' and use the options provided on the rest of the line when checking out the specified revision. Synopsis: Makercsrev <rev#> Use: Checks out every RCS file and checks it back in with the revision specified, thus creating a new revision. Useful for changing the major revision number so that checking out '-r4', for example, will check out the latest revision of all the files. Also useful for checking out an older revision and making it the latest revision. This might be necessary if it is found that a previous revision is better than the updated revision and we basically want to return to the previous revision without having to "out-date" all the intermediate revisions. Setrcsname Sets the name for a revision of every RCS file. Synopsis: Setrcsname -n <name> [-l] [file-list] Setrcsname -n <name>:<rev> [-m] [file-list] Setrcsname -N <name> [-l] [file-list] Setrcsname -N <name>:<rev> [-m] [file-list] Use: In all forms, if 'file-list' is not provided, all the files in the RCS directory are affected. In the first form, the symbolic name <name> is deleted from the RCS files. If the '-l' flag is provided, the last revision of all the RCS files has its last component removed and the <name> is defined to be this revision. For example, in a particular RCS file, if the last revision is 2.34, the symbolic name <name> will be set to '2'. Thus, if the file is checked out with the name <name>, the last revision '2' will be checked out (which could be 2.35, 2.36, ..., depending on what the last revision is when the file is checked out). If the symbolic name <name> already exists when Setrcsname is run, an error will be generated and the name will not be set. In the second form, the symbolic name <name> is set to revision <rev> in all the RCS files. If the '-m' flag is provided, the name will be set *only if* the revision actually exists. If the symbolic name <name> already exists, an error will be generated and the name will not be set. The third and fourth forms are identical to the first and second forms, respectively, except that if the symbolic name already exists, it will be changed to the new revision. Setrcsstate Sets a state for a revision of every RCS file. Synopsis: Setrcsstate <state> Setrcsstate [-m] <state>:<rev> -m Set state only if revision exists. Use: This script sets the state for a revison of all RCS files found in the RCS subdirectory. In the first form, the state of the last branch of every file found in the RCS subdirectory is set to <state>. In the second form, the specified revision is set to <state>. ci-script Performs a ci on the file(s) requested. Synopsis: alias ci ci-script ... ci <somefile> Use: Provides added automatic functions when a ci is performed. These functions include: 1. Always performs default options $opt (defined in this script). This allows the user to define ci options that should always be set. 2. Performs options found in environment variable RCSOPTS. If there is an environment variable RCSOPTS set, it appends these options to the default set. 3. Performs options found in file ./.rcsopts. If there is a file in the current directory named .rcsopts, the checks if there is a line beginning with 'ci' in it. If there is, it assumes the rest of the line are options that are to be appended to the ones defined so far when doing the ci. Note, this allows the user to define specific options to be performed in different directories. 4. Passes arguments from command line to ci. Any other options or arguments on the command line are passed to ci. Note, if there are conflicting options in one of the above sets, it chooses the correct set of options to actually use. ciAll Script that will check in all the files found in the current directory. Synopsis: ciAll [<opts>] <opts> Any additional options to be provided to the ci command. Uses: Similar to performing a 'ci <opts> *' command except this script is smart enough to skip directories and provides the user with an option of checking in files that have never been checked in before. For example, in a directory where there are object files and executables, the user is prompted as to whether to check in the object files (since they have never been checked in) and the user can choose y/n to have the file checked in or not. Also, if the file has never been checked in and the user elects to have it checked in, this script will print the first 30 lines of the file to help the user determine what to write as a description for the file when ci asks for it. co-script Similar to ci-script except should be aliased to the 'co' command. col-script Similar to co-script except could be aliased to the 'col' command. This would be identical to 'co -l' except it allows the user the ability to have different options passed to co when the file is to be checked out and locked.
Documentation